{% extends 'base.html' %}
{% block title %}
    <title>会员中心</title>
{% endblock %}
{% block container %}
    <!--主体-->
    <div class="weui-content">
      <div class="wy-center-top">
        <div class="weui-media-box weui-media-box_appmsg">
          <div class="weui-media-box__hd">
            <img
              class="weui-media-box__thumb radius"
              src="../medias/avatar/headimg.jpg"
              alt=""
            />
          </div>
          <div class="weui-media-box__bd">
            <h4 class="weui-media-box__title user-name">{{ user.nickname }}</h4>
            <p class="user-grade">等级：普通会员</p>
            <p class="user-integral">
              剩余积分：<em class="num">{{ user.integral }}</em>积分
            </p>
          </div>
        </div>
      </div>
      <div class="weui-panel weui-panel_access">
        <div class="weui-panel__hd">
          <a
            href="{% url 'mine:order_list' %}"
            class="weui-cell weui-cell_access center-alloder"
          >
            <div class="weui-cell__bd wy-cell">
              <div class="weui-cell__hd">
                <img
                  src="/static/images/center-icon-order-all.png"
                  alt=""
                  class="center-list-icon"
                />
              </div>
              <div class="weui-cell__bd weui-cell_primary">
                <p class="center-list-txt">全部订单</p>
              </div>
            </div>
            <span class="weui-cell__ft"></span>
          </a>
        </div>
        <div class="weui-panel__bd">
          <div class="weui-flex">
            <div class="weui-flex__item">
              <a href="{% url 'mine:order_list' %}?status={{ contants.ORDER_STATUS_SUBMIT }}" class="center-ordersModule">
                <span
                  class="weui-badge"
                  style="position: absolute;top:5px;right:10px; font-size:10px;"
                  >2</span
                >
                <div class="imgicon">
                  <img src="/static/images/center-icon-order-dfk.png" />
                </div>
                <div class="name">待付款</div>
              </a>
            </div>
            <div class="weui-flex__item">
              <a href="{% url 'mine:order_list' %}?status={{ contants.ORDER_STATUS_PAIED }}" class="center-ordersModule">
                <span
                  class="weui-badge"
                  style="position: absolute;top:5px;right:10px; font-size:10px;"
                  >1</span
                >
                <div class="imgicon">
                  <img src="/static/images/center-icon-order-dfh.png" />
                </div>
                <div class="name">待发货</div>
              </a>
            </div>
            <div class="weui-flex__item">
              <a href="{% url 'mine:order_list' %}?status={{ contants.ORDER_STATUS_SENT }}" class="center-ordersModule">
                <div class="imgicon">
                  <img src="/static/images/center-icon-order-dsh.png" />
                </div>
                <div class="name">待收货</div>
              </a>
            </div>
            <div class="weui-flex__item">
              <a href="{% url 'mine:order_list' %}?status={{ contants.ORDER_STATUS_DONE }}" class="center-ordersModule">
                <span
                  class="weui-badge"
                  style="position: absolute;top:5px;right:10px; font-size:10px;"
                  >2</span
                >
                <div class="imgicon">
                  <img src="/static/images/center-icon-order-dpj.png" />
                </div>
                <div class="name">待评价</div>
              </a>
            </div>
          </div>
        </div>
      </div>

      <div class="weui-panel">
        <div class="weui-panel__bd">
          <div class="weui-media-box weui-media-box_small-appmsg">
            <div class="weui-cells">
              <a class="weui-cell weui-cell_access"
                 href="{% url 'mine:prod_collect' %}">
                <div class="weui-cell__hd">
                  <img
                    src="/static/images/center-icon-sc.png"
                    alt=""
                    class="center-list-icon"
                  />
                </div>
                <div class="weui-cell__bd weui-cell_primary">
                  <p class="center-list-txt">我的收藏</p>
                </div>
                <span class="weui-cell__ft"></span>
              </a>
              <a class="weui-cell weui-cell_access"
                 href="{% url 'accounts:address_list' %}">
                <div class="weui-cell__hd">
                  <img
                    src="/static/images/center-icon-dz.png"
                    alt=""
                    class="center-list-icon"
                  />
                </div>
                <div class="weui-cell__bd weui-cell_primary">
                  <p class="center-list-txt">地址管理</p>
                </div>
                <span class="weui-cell__ft"></span>
              </a>
{#              <a class="weui-cell weui-cell_access" href="../../accounts/templates/pwd_change.html">#}
{#                <div class="weui-cell__hd">#}
{#                  <img#}
{#                    src="images/center-icon-dlmm.png"#}
{#                    alt=""#}
{#                    class="center-list-icon"#}
{#                  />#}
{#                </div>#}
{#                <div class="weui-cell__bd weui-cell_primary">#}
{#                  <p class="center-list-txt">密码修改</p>#}
{#                </div>#}
{#                <span class="weui-cell__ft"></span>#}
{#              </a>#}
              <a class="weui-cell weui-cell_access"
                 href="{% url 'accounts:user_logout' %}">
                <div class="weui-cell__hd">
                  <img
                    src="/static/images/center-icon-out.png"
                    alt=""
                    class="center-list-icon"
                  />
                </div>
                <div class="weui-cell__bd weui-cell_primary">
                  <p class="center-list-txt">退出账号</p>
                </div>
                <span class="weui-cell__ft"></span>
              </a>
            </div>
          </div>
        </div>
      </div>
    </div>
{% endblock %}
{% block footer %}
    <!--底部导航-->
    <div class="foot-black"></div>
    <div class="weui-tabbar wy-foot-menu">
      <a href="{% url 'index' %}" class="weui-tabbar__item">
        <div class="weui-tabbar__icon foot-menu-home"></div>
        <p class="weui-tabbar__label">首页</p>
      </a>
      <a href="{% url 'mall:prod_classify' %}" class="weui-tabbar__item">
        <div class="weui-tabbar__icon foot-menu-list"></div>
        <p class="weui-tabbar__label">分类</p>
      </a>
      <a href="{% url 'mine:cart' %}" class="weui-tabbar__item">
        {% if cart_count > 0 %}
          <span
          class="weui-badge"
          style="position: absolute;top: -.4em;right: 1em;"
          >{{ cart_count }}</span
        >
        {% endif %}
        <div class="weui-tabbar__icon foot-menu-cart"></div>
        <p class="weui-tabbar__label">购物车</p>
      </a>
      <a href="{% url 'mine:index' %}" class="weui-tabbar__item weui-bar__item--on">
        <div class="weui-tabbar__icon foot-menu-member"></div>
        <p class="weui-tabbar__label">我的</p>
      </a>
    </div>
{% endblock %}
